/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import cn.webrx.mapper.DbMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * <p>Project: sboot2021 - App
 * <p>Powered by webrx On 2021-07-29 12:50:01
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 16
 */
@SpringBootApplication
public class App implements ApplicationRunner {
    @Autowired
    private DbMapper dm;

    public static void main(String[] args) {
        SpringApplication.run(App.class, args);

        //SpringApplication a = new SpringApplication(App.class);
        //a.setBannerMode(Banner.Mode.OFF);
        //a.setLogStartupInfo(false);
        //a.run(args);
    }

    @Override
    public void run(ApplicationArguments args) throws Exception {
        System.out.println(dm.version());
        System.out.println(dm.dbInfo());
        System.out.println(dm.dbs());
        System.out.println(dm.tbs());
        System.out.println(dm.userInfo());
        System.out.println(dm.tbs("mysql"));
    }
}
